﻿using System;
using System.Collections.Generic;
using System.Text;
using Gtk;

namespace GtkSharpTutorial
{
    class ToggleButtons
    {
        static void clickedCallback(object obj, EventArgs args)
        {
            /* Check Active Property */

            if (((ToggleButton)obj).Active)
                Console.WriteLine("ToggleButton clicked, I'm activating");
        }

        public Widget GetButton()
        { 
            /* Creating a new ToggleButton*/
            ToggleButton togglebutton = new ToggleButton("button1");
            togglebutton.Clicked += clickedCallback;

            return togglebutton;
        }
    }
}
